<% layout("/WEB-INF/view/console/skins/skin_2/layout.html", {}) {
%>
<div class="row">
    <div class="col-md-12">
        <div class="widget-container fluid-height clearfix">
            <div class="widget-content padded clearfix">
                <div class='row'>
                    <div class='col-md-12'>
                        <form name="boComment_form" id="boComment_form" class='form-inline'>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='新鲜度' >新鲜度：</label>
 <select class="form-control" id="gradeFresh" name="gradeFresh">
 <option  value="">请选择...</option>
 	<option  value="1">好</option>
 	<option  value="2">中</option>
 	<option  value="3">差</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='产品包装' >产品包装：</label>
 <select class="form-control" id="gradePack" name="gradePack">
 <option  value="">请选择...</option>
 	<option  value="1">好</option>
 	<option  value="2">中</option>
 	<option  value="3">差</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='干净度' >干净度：</label>
 <select class="form-control" id="gradeClean" name="gradeClean">
 <option  value="">请选择...</option>
 	<option  value="1">好</option>
 	<option  value="2">中</option>
 	<option  value="3">差</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='干净度' >干净度：</label>
 <select class="form-control" id="gradeTaste" name="gradeTaste">
 <option  value="">请选择...</option>
 	<option  value="1">好</option>
 	<option  value="2">中</option>
 	<option  value="3">差</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='订单id'  >订单id：</label>
 <input  onkeyup='boCommentConsoleGrid.enterToQuery(event);' type='text' class='form-control' id='orderId' name='orderId' placeholder=''>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='商品id'  >商品id：</label>
 <input  onkeyup='boCommentConsoleGrid.enterToQuery(event);' type='text' class='form-control' id='goodsId' name='goodsId' placeholder=''>
 </div>
 
                        </form>
                    </div>
                </div>
                <div class='row'>
                    <div align="center">
                        <button type='button' class='btn btn-default' id='boCommentQuerySearch'>查询</button>
                        <button type='button' class='btn btn-default' id='boCommentReset'>重置</button>
                    </div>
                </div>
                 <div id="boCommentToolbar" class="btn-group">
                           <!--   <button type="button" class="btn btn-default" onclick="consoleOpenWindow('boComment','${ctxPath}/console/bo_comment/add','新增')">
                                  <i class="glyphicon glyphicon-plus"></i>
                              </button>
                              <button type="button" class="btn btn-default" onclick='boCommentConsoleGrid.delete("id","${ctxPath}/console/bo_comment/delete");'>
                                  <i class="glyphicon glyphicon-trash"></i>
                              </button>-->
                 </div>
                     <div class='row'>
                              <div class='col-md-12'>
                                  <table id="boComment" data-toggle="table"
                                         data-url="${ctxPath}/console/bo_comment/json"
                                         data-pagination="true"
                                         data-query-params="boCommentLoadParam"
                                         method="post"
                                         data-side-pagination="server"
                                         data-show-refresh="true"
                                         data-show-toggle="true"
                                         data-pagination-loop="false"
                                         data-show-columns="true"
                                         data-toolbar="#boCommentToolbar">
                                      <thead>
                                      <tr>
                                           <th data-checkbox="true"></th>
                                            <th data-field='id' data-visible='false'>ID</th>
  <th data-sortable='true' data-field='content'>内容</th>
  <th data-sortable='true' data-field='proxyId'>用户id</th>
  <th data-sortable='true' data-field='createTime'>评论日期</th>
  <th data-sortable='true' data-field='images'>评论图片</th>
  <th data-field='gradeFresh' data-sortable='true' data-formatter='boCommentgrade_freshFormatter'>新鲜度</th>
  <th data-field='gradePack' data-sortable='true' data-formatter='boCommentgrade_packFormatter'>产品包装</th>
  <th data-field='gradeClean' data-sortable='true' data-formatter='boCommentgrade_cleanFormatter'>干净度</th>
  <th data-field='gradeTaste' data-sortable='true' data-formatter='boCommentgrade_tasteFormatter'>干净度</th>
  <th data-sortable='true' data-field='orderId'>订单id</th>
  <th data-sortable='true' data-field='goodsId'>商品id</th>
<!--  <th data-field='id' data-formatter='boCommentTableOperate'>操作</th>-->
 
                                      </tr>
                                      </thead>
                                  </table>
                              </div>
                     </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
     var boCommentConsoleGrid =new consoleGrid({table_id:"boComment"});
     boCommentConsoleGrid.init();
     function boCommentTableOperate(value){
         return "<button type='button' class='btn btn-xs btn-default command-edit' onclick='consoleOpenWindow(\"boComment\",\"${ctxPath}/console/bo_comment/edit?id="+value+"\",\"编辑\")'><span class='glyphicon glyphicon-pencil'></span></button> ";
     }
    function boCommentLoadParam(params){
        params.query=boCommentQueryString();
        return params;
    }
     function boCommentQueryString() {
         var objQuery = new Object();
     objQuery.proxyId=$('#proxyId').val()==''?null:$('#proxyId').val();
     objQuery.gradeFresh=$('#gradeFresh').val()==''?null:$('#gradeFresh').val();
     objQuery.gradePack=$('#gradePack').val()==''?null:$('#gradePack').val(); 
     objQuery.gradeClean=$('#gradeClean').val()==''?null:$('#gradeClean').val(); 
     objQuery.gradeTaste=$('#gradeTaste').val()==''?null:$('#gradeTaste').val(); 
     objQuery.orderId=$('#orderId').val()==''?null:$('#orderId').val(); 
     objQuery.goodsId=$('#goodsId').val()==''?null:$('#goodsId').val(); 
 
         var queryString = JSON.stringify(objQuery);
         return queryString;
     }

     function boCommentgrade_freshFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '好';
       break;
       case '2': 
       showValue = '中';
       break;
       case '3': 
       showValue = '差';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
 function boCommentgrade_packFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '好';
       break;
       case '2': 
       showValue = '中';
       break;
       case '3': 
       showValue = '差';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
 function boCommentgrade_cleanFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '好';
       break;
       case '2': 
       showValue = '中';
       break;
       case '3': 
       showValue = '差';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
 function boCommentgrade_tasteFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '好';
       break;
       case '2': 
       showValue = '中';
       break;
       case '3': 
       showValue = '差';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }

 </script>
<%} %>
 